public class demo14 {
    public static void main(String[] args) throws InterruptedException {
        Thread t=new Thread(()->{
            for(int i=0;i<3000;i++){
                System.out.println("hello run");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
            System.out.println("t线程结束");
        });
        t.start();
//        t.join();
//        t.join(3000);
        System.out.println("main线程结束");

    }
}
